<%@page import="com.jsz.peini.common.util.PeiniUtils"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>活动详情</title>
    
	<meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
	<meta name = "format-detection" content = "telephone=no">
	<link rel="stylesheet" href=" dist/css/swiper.min.css">
	<link rel="stylesheet" type="text/css" href="css/index.css">
	<link rel="stylesheet" type="text/css" href="css/index-act.css">
	<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
	<style type="text/css">
	.la{border-bottom: 1px solid #c6c6c6}
	.ade-w .ad-adres{margin-top: .6rem;font-size: .87rem;color:#333;}
	</style>
	
	<script type="text/javascript">
		function acReg(acId){
			//alert(acId);
			location.href="acReg:"+acId;
		}
		function toDetail(acId){
		  var url = "<%=path %>/activity/resondetail?id="+acId;
            		//alert(url);
            		location.href = url;
		}
		
	</script>
  </head>
  
  <body>
    <section class="cod-det">
	 	<div>
	 		<ul>	 			
	 			<li>
	 				<div class="ade-tu">
	 					<img src="<%=PeiniUtils.IMGHOST %>${info.acImg}" alt="">
	 				</div>
	 				<div class="ade-w">
	 					<div class="ad-title">
	 						<span>${info.acTitle }</span>
	 					</div>
	 					<div class="la">
	 						<em>${info.acTag }</em><em class="fre">
								<c:choose>
	 								<c:when test="${info.acFee == 0}">
	 									免费
	 								</c:when>
	 								<c:otherwise>
	 									¥<fmt:formatNumber value="${info.acFee/100 }" pattern="#.00"/>
	 								</c:otherwise>
	 							</c:choose>
							</em><i><%-- ${isReg == 1 ? '我参与的' : '' } --%></i>
	 					</div>
	 					<div class="ad-adres">
	 						${info.describe }${info.acAddress }
	 					</div>
	 					<div class="ad-state">
	 						<c:choose>
	 							<c:when test="${info.acStatus == 0 }">
	 								报名中
	 							</c:when>
	 							<c:when test="${info.acStatus == 2 }">
	 								报名已结束
	 							</c:when>
	 							<c:when test="${info.acStatus == 4 }">
	 								报名已满
	 							</c:when>
	 							<c:when test="${info.acStatus == 5 }">
	 								已报名
	 							</c:when>
	 							<c:when test="${info.acStatus == 1 }">
	 								活动中
	 							</c:when>
	 							<c:when test="${info.acStatus == -1 }">
	 								已结束
	 							</c:when>
	 						</c:choose>
	 					</div>
	 				</div>
	 			</li>
	 			
	 		</ul>
	 	</div>
	 </section>
	  <section class="en-member"> 
	 	<div>
	 		<h6>报名成员<span>${info.regUserCnt }</span></h6>
	 		<div class="me-list" onclick="toDetail('${info.acId}')">
	 			<ul>
	 			    <c:forEach var="image" items="${userimages}">
	 			    <li><img src="${image.image }" alt=""></li>
	 			    </c:forEach>
<!-- 	 			<li><img src="images/tu01.png" alt=""></li> -->
<!-- 	 			<li><img src="images/tu01.png" alt=""></li> -->
<!-- 	 			<li><img src="images/tu01.png" alt=""></li> -->
<!-- 	 			<li><img src="images/tu01.png" alt=""></li> -->
<!-- 	 			<li><img src="images/tu01.png" alt=""></li> -->
	 			</ul>
	 			<div class="go" ></div>
	 		</div>
	 		
	 	</div>
	 </section>
	 <section class="act-details">
	 	<div>
	 		<h5>活动详情</h5>
	 		${info.acDesc }
	 	</div>
	 </section>
	<!-- <section class="down">
	 	<div>
	 		<span>时光因你而不同</span>
	 		<button onclick="download()">立即下载</button>
	 	</div>
	 </section> -->
	 <script type="text/javascript">
		function download(){
			var u = navigator.userAgent;
		    var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
		    var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
		    if(isAndroid == true){
		    	//alert("安卓");
		    	location.href="<%=PeiniUtils.ANDROIDURL%>";
		    }else{
		    	location.href="<%=PeiniUtils.IOSURL%>";
		    }
		    /* alert('是否是Android：'+isAndroid);
		    alert('是否是iOS：'+isiOS); */
		}
	</script>
  </body>
</html>
